package day76.ling.in.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

import java.util.Date;

@Aspect
@Component
@Slf4j
public class MyAdvices {
@Pointcut("execution(*day76.ling.in.services..*.*(..))")
    public void t1(){}

    @Before("t1()")
    public void before(JoinPoint jp){
    log.info(new Date()+"执行了："+jp.getSignature().getName());
    }
}
